package org.plex.search.imp;

import org.plex.search.ColumnInfo;
import org.plex.search.SortOrder;

public class SortOrderImp implements SortOrder
{
	
	private com.adobe.idp.taskmanager.dsc.client.query.SortOrder sortOrder;
	
	public com.adobe.idp.taskmanager.dsc.client.query.SortOrder getSortOrder()
	{
		return sortOrder;
	}


	public void setSortOrder(
			com.adobe.idp.taskmanager.dsc.client.query.SortOrder sortOrder)
	{
		this.sortOrder = sortOrder;
	}


	public SortOrderImp(com.adobe.idp.taskmanager.dsc.client.query.SortOrder sortOrder)throws NullPointerException
	{
		if(null == sortOrder)
		{
		  throw new NullPointerException();
		}
	   this.sortOrder=sortOrder;	
	}
    	

	public int getPrimarySort()
	{
		// TODO Auto-generated method stub
		return this.sortOrder.getPrimarySort();
	}

	public int getSecondarySort()
	{
		// TODO Auto-generated method stub
		return this.sortOrder.getSecondarySort();
	}

	public boolean isPrimarySortEmpty()
	{
		// TODO Auto-generated method stub
		return this.sortOrder.isPrimarySortEmpty();
	}

	public boolean isSecondarySortEmpty()
	{
		// TODO Auto-generated method stub
		return this.sortOrder.isSecondarySortEmpty();
	}

	public void setPrimarySortCriteria(ColumnInfo columnInfo, int sort)
	{
		ColumnInfoImp imp=(ColumnInfoImp)columnInfo;
		this.sortOrder.setPrimarySortCriteria(imp.getColumnInfo(), sort);
	}

	public void setSecondarySortCriteria(ColumnInfo columnInfo, int sort)
	{
	    ColumnInfoImp imp=(ColumnInfoImp)columnInfo;
	    this.sortOrder.setSecondarySortCriteria(imp.getColumnInfo(), sort);

	}

}
